package cm.server.controller;

import cm.server.dao.VenueAreaRepository;
import cm.server.entity.Venue;
import cm.server.entity.VenueArea;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author zy
 * @description
 * @date 2021/4/6 16:08
 */
@RestController
@RequestMapping("venueArea")
@CrossOrigin
public class VenueAreaController {
    @Autowired
    private VenueAreaRepository venueAreaRepository;

    @RequestMapping(value = "/allarea", method = RequestMethod.GET)
    @ResponseBody
    public List<VenueArea> allArea(int floor) {
        return venueAreaRepository.findAllByFloor(floor);
    }
}
